package com.lyy.extend_study.exercise;


/**
 * @Author:  GZQ
 * @date:  2024/11/14 23:46
 * @description: 编写Computer类, 包含cpu、 内存、 硬盘等属性。 getDetails()方法, 用于返回Computer的详细信息。
 */

public class Computer {
    private String cpu;
    private String memory;
    private String hardDisk;

    public Computer(String cpu, String memory, String hardDisk) {
        this.cpu = cpu;
        this.memory = memory;
        this.hardDisk = hardDisk;
    }

    /**
     * @return：
     * 返回Computer详细信息
     */
    public String getDetails() {
        return "CPU:" + cpu + " 内存:" + memory + " 硬盘:" + hardDisk;
    }

    public String getCpu() {
        return cpu;
    }

    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public String getMemory() {
        return memory;
    }

    public void setMemory(String memory) {
        this.memory = memory;
    }

    public String getHardDisk() {
        return hardDisk;
    }

    public void setHardDisk(String hardDisk) {
        this.hardDisk = hardDisk;
    }
}
